<#assign pageName="新增资源信息">
<@override name="head-styles">
</@override>
<@override name="page-content">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>${pageName}</legend>
    </fieldset>
    <form class="layui-form padding-10" lay-filter="formResourceAdd">
          <@ctrl.Hidden path="resources.guid" value="${guid}"/>
          <@ctrl.SingleSelect path="resources.type" options={'URL':'URL','METHOD':'METHOD'} labelText="资源类型" required="required"/>
          <@ctrl.Textbox path="resources.name" labelText="资源名称" required="required"/>
          <@ctrl.Textbox path="resources.priority" labelText="优先级别" required="required"/>
          <@ctrl.Textbox path="resources.content" labelText="资源内容" required="required"/>
          <@ctrl.Textarea path="resources.memo" labelText="备注说明"/>
          <@ctrl.FormAction backURL="../management?gid=${guid}"/>
    </form>
</@override>
<@override name="page-scripts">
<script>
    $(function(){
        layui.use(['form','layer', 'jquery'], function(){
            var form = layui.form;
            var layer=layui.layer;
            $=layui.jquery;
            //监听提交
            form.on('submit(submit)', function(data){
                submitData(data.field, '${contextPath}/admin/resources/add', function(){location.href="${contextPath}/admin/resources/management?gid=${guid}";});
                return false;
            });
        })
    })
</script>
</@override>
<@extends name="/layout/basepage.html"/> 